<span page-title ng-model="contentView">{{ 'Promote Content View:' | translate }} {{ contentView.name }}</span>

<div>
  <h3 translate>Promote Version {{ version.version }}</h3>

  <p class="details" translate>
    Choose a lifecycle environment from the available promotion paths.
  </p>

  <p class="info" translate>
    <i class="fa fa-star"></i>
    Starred environments are suggested for promotion.
  </p>

  <p ng-hide="working">
    <i class="fa fa-spinner fa-spin"></i>
    <span translate>Loading Environment Paths...</span>
  </p>
  <div path-selector="availableEnvironments"
       ng-model="selectedEnvironment"
       mode="singleSelect"
       selection-required="false"
       path-attribute="environments"
       ng-hide="denied('promote_or_remove_content_views', contentView)"
       ng-show="working">
  </div>

  <label translate>Description</label>
  <div>
    <textarea id="description"
      name="description"
      ng-model="description"
      rows="10"
      cols="80"
      tabindex="1">
    </textarea>
  </div>

  <div>
    <button type="button" class="btn btn-primary btn-lg" ng-disabled="promoting || !selectedEnvironment" ng-click="verifySelection()" translate>
      Promote Version
    </button>

    <a ui-sref="content-view.versions" class="btn btn-default btn-lg"  translate role="button">
      Cancel
    </a>

    <div bst-modal="promote()" model="selectedEnvironment" model="selectedEnvironment">
      <div data-block="modal-header" translate>Force Promote?</div>
      <div data-block="modal-body" translate>Promote version to {{ selectedEnvironment.name }}?<br /><br />{{ suggestedEnvironmentMessage() }}</div>
      <span data-block="modal-confirm-button">
        <button class="btn btn-primary" ng-click="ok()">
          <span translate>Promote</span>
        </button>
      </span>
    </div>
  </div>

</div>
